<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>众秀众筹</title>
	<meta name="Keywords" content="众筹，众筹网，众筹导航，众筹门户，股权众筹，众筹平台，众筹圈子人，众筹项目，众筹三方
影视众筹，店铺众筹，餐饮众筹，众筹报告，创业众筹，投后管理，项目融资，项目众筹，权力的游戏，冰与火之歌" />
	<meta name="Description" content="汇集各行业高手分析众筹项目，行业问答，众筹资讯。" />
	<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible" />
	<meta name="renderer" content="webkit"/>
	<link rel="stylesheet" href="<%=path%>/css/bootstrap/3.3.5/css/bootstrap.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/cropper.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/cz.css" />

	<script src="<%=path%>/js/jquery-1.11.0.min.js"></script>
	<script src="<%=path%>/js/plugins/datapicker/bootstrap-datepicker.js"></script>
	<script src="<%=path%>/js/plugins/layer/layer.js"></script>
	<script src="<%=path%>/css/bootstrap/3.3.5/js/bootstrap.min.js"></script>

	<script src="<%=path%>/js/slider.js"></script>
	<script src="<%=path%>/js/cropper.min.js"></script>
	<script src="<%=path%>/js/common.js"></script>
</head>
<body class="gray-bg">
<jsp:include page="/views/commons/header.jsp"></jsp:include>
<div class="container page-single">
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">
				<h3 class="panel-title">项目类型编辑</h3>
			</div>
			<div class="panel-body event-create">
				<form class="form-horizontal" id="projectType_form" action="javascript:insertProjectType()">
					<input type="hidden" name="projectTypeId" value="${projectType.projectTypeId}"/>
					<input type="hidden" name="typeIndex" value="${projectType.typeIndex}"/>
					
					<div class="form-group">
						<label class="col-sm-1 control-label">项目类型名称<em>*</em></label>
						<div class="col-sm-10">
							<input type="text" class="form-control" placeholder="项目类型名称" name="projectTypeName" value="${projectType.projectTypeName}"></div>
					</div>
					<d:radio describe="是否需要地址" tableColumn="needs_address" fieldName="needsAddress" value="${projectType.needsAddress}"></d:radio>
					
					<div class="form-group">
						<label class="col-sm-1 control-label">拆解项配置<em>*</em></label>
						<div class="col-sm-10">
							<textarea name="typeDetail" rows="3" cols="93">${projectType.typeDetail}</textarea>
						</div>
					</div>
					<div class="o-single-content__body__content">
						<div class="alert alert-warning"> <strong>郑重声明</strong>
							<p>
								1.所发布、转载、摘编的文章大多来源于互联网（我们会尽量标注来源和作者）。转载目的在于传递更多信息，不代表本网观点及真实性，如果作品内容、版权和其它问题侵害到您的权益，我们感到很抱歉，并将火速处理。联系方式：1219451703@qq.com，也诚挚地欢迎您给我们投稿，谢谢！
							</p>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-9 col-sm-offset-2">
							<button  class="btn btn-primary" id="projectType_confirm_btn" >提交</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>

<jsp:include page="/views/commons/footer.jsp"></jsp:include>
<script type="text/javascript">
	function insertProjectType(){
		$("#projectType_confirm_btn").addClass("disabled").attr("disabled","disabled").val("提交中");
		$.ajax({
			url : path + "/admin/projectType/update",
			type : "post",
			dataType : "json",
			data : $("#projectType_form").serialize(),
			success : function(data)
			{
				if(data.result){
					layer.msg("发布成功",{icon: 1});;
					window.close();
				}else{
					layer.msg(data.message,{icon: 2});;
					$("#projectType_confirm_btn").removeClass("disabled").removeAttr("disabled").val("提交");
				}
			},error:function(){
				layer.msg("服务器网络繁忙",{icon: 2});
				$("#projectType_confirm_btn").removeClass("disabled").removeAttr("disabled").val("提交");
			}
		});
	}
</script>
</body>
</html>